import { VanText } from "./info/van-text/src/van-text";

export async function createComponent (comp) {
  switch (comp.type) {
    case "van-text":
      return new VanText(comp);
    default:
      throw Error(`Unknown component type: ${comp.name}.`);
  }
}